GVariant *state,
gboolean should_emit_signals)
{
- GTK_NOTE(ACTIONS, g_message("actionhelper: %s added", helper->action_name));
+ GTK_NOTE(ACTIONS, g_message("%s: action %s added", "actionhelper", helper->action_name));
/* we can only activate if we have the correct type of parameter */
helper->can_activate = (helper->target == NULL && parameter_type == NULL) ||
if (!helper->can_activate)
{
- GTK_NOTE(ACTIONS, g_message("actionhelper: %s found, but disabled due to parameter type mismatch",
- helper->action_name));
+ GTK_NOTE(ACTIONS, g_message ("%s: action %s can't be activated due to parameter type mismatch "
+ "(parameter type %s, target type %s)",
+ "actionhelper",
+ helper->action_name,
+ parameter_type ? g_variant_type_peek_string (parameter_type) : "NULL",
+ helper->target ? g_variant_get_type_string (helper->target) : "NULL"));
return;
}
- GTK_NOTE(ACTIONS, g_message ("actionhelper: %s can be activated", helper->action_name));
+ GTK_NOTE(ACTIONS, g_message ("%s: %s can be activated", "actionhelper", helper->action_name));
helper->enabled = enabled;
- if (!enabled)
- GTK_NOTE(ACTIONS, g_message("actionhelper: %s found, but disabled due to disabled action", helper->action_name));
- else
- GTK_NOTE(ACTIONS, g_message("actionhelper: %s found and enabled", helper->action_name));
+ GTK_NOTE(ACTIONS, g_message ("%s: action %s is %s", "actionhelper", helper->action_name, enabled ? "enabled" : "disabled"));
if (helper->target != NULL && state != NULL)
{
static void
gtk_action_helper_action_removed (GtkActionHelper *helper)
{
- GTK_NOTE(ACTIONS, g_message ("actionhelper: %s was removed", helper->action_name));
+ GTK_NOTE(ACTIONS, g_message ("%s: action %s was removed", "actionhelper", helper->action_name));
if (!helper->can_activate)
return;
gtk_action_helper_action_enabled_changed (GtkActionHelper *helper,
gboolean enabled)
{
- GTK_NOTE(ACTIONS, g_message ("actionhelper: %s enabled changed: %d", helper->action_name, enabled));
+ GTK_NOTE(ACTIONS, g_message ("%s: action %s: enabled changed to %d", "actionhelper", helper->action_name, enabled));
if (!helper->can_activate)
return;
{
gboolean was_active;
- GTK_NOTE(ACTIONS, g_message ("actionhelper: %s state changed", helper->action_name));
+ GTK_NOTE(ACTIONS, g_message ("%s: %s state changed", "actionhelper", helper->action_name));
if (!helper->can_activate)
return;
GTK_NOTE(ACTIONS,
if (action_name == NULL || !strchr (action_name, '.'))
- g_message ("actionhelper: action name %s doesn't look like 'app.' or 'win.' "
- "which means that it will probably not work properly.", action_name));
+ g_message ("%s: action name %s doesn't look like 'app.' or 'win.'; "
+ "it is unlikely to work",
+ "actionhelper", action_name));
if (helper->action_name)
{
if (g_action_group_query_action (G_ACTION_GROUP (helper->action_context), helper->action_name,
&enabled, ¶meter_type, NULL, NULL, &state))
{
- GTK_NOTE(ACTIONS, g_message ("actionhelper: %s existed from the start", helper->action_name));
+ GTK_NOTE(ACTIONS, g_message ("%s: action %s existed from the start", "actionhelper", helper->action_name));
gtk_action_helper_action_added (helper, enabled, parameter_type, state, FALSE);
}
else
{
- GTK_NOTE(ACTIONS, g_message ("actionhelper: %s missing from the start", helper->action_name));
+ GTK_NOTE(ACTIONS, g_message ("%s: action %s missing from the start", "actionhelper", helper->action_name));
helper->enabled = FALSE;
}
GtkMenuTrackerItem *self = GTK_MENU_TRACKER_ITEM (observer);
GVariant *action_target;
- GTK_NOTE(ACTIONS, g_message("menutracker: %s added", action_name));
+ GTK_NOTE(ACTIONS, g_message ("menutracker: action %s added", action_name));
action_target = g_menu_item_get_attribute_value (self->item, G_MENU_ATTRIBUTE_TARGET, NULL);
if (!self->can_activate)
{
- GTK_NOTE(ACTIONS, g_message("menutracker: %s found, but disabled due to parameter type mismatch", action_name));
+ GTK_NOTE(ACTIONS, g_message ("menutracker: action %s can't be activated due to parameter type mismatch "
+ "(parameter type %s, target type %s)",
+ action_name,
+ parameter_type ? g_variant_type_peek_string (parameter_type) : "NULL",
+ action_target ? g_variant_get_type_string (action_target) : "NULL"));
if (action_target)
g_variant_unref (action_target);
return;
}
- GTK_NOTE(ACTIONS, g_message ("menutracker: %s can be activated", action_name));
+ GTK_NOTE(ACTIONS, g_message ("menutracker: action %s can be activated", action_name));
self->sensitive = enabled;
- if (!enabled)
- GTK_NOTE(ACTIONS, g_message("menutracker: %s found, but disabled due to disabled action", action_name));
- else
- GTK_NOTE(ACTIONS, g_message("menutracker: %s found and enabled", action_name));
+ GTK_NOTE(ACTIONS, g_message ("menutracker: action %s is %s", action_name, enabled ? "enabled" : "disabled"));
if (action_target != NULL && state != NULL)
{
{
GtkMenuTrackerItem *self = GTK_MENU_TRACKER_ITEM (observer);
- GTK_NOTE(ACTIONS, g_message ("menutracker: %s enabled changed: %d", action_name, enabled));
+ GTK_NOTE(ACTIONS, g_message ("menutracker: action %s: enabled changed to %d", action_name, enabled));
if (!self->can_activate)
return;
GVariant *action_target;
gboolean was_toggled;
- GTK_NOTE(ACTIONS, g_message ("menutracker: %s state changed", action_name));
+ GTK_NOTE(ACTIONS, g_message ("menutracker: action %s: state changed", action_name));
if (!self->can_activate)
return;
gboolean was_sensitive, was_toggled;
GtkMenuTrackerItemRole old_role;
- GTK_NOTE(ACTIONS, g_message ("menutracker: %s was removed", action_name));
+ GTK_NOTE(ACTIONS, g_message ("menutracker: action %s was removed", action_name));
if (!self->can_activate)
return;
GTK_NOTE(ACTIONS,
if (!strchr (action_name, '.'))
- g_message ("menutracker: action name %s doesn't look like 'app.' or 'win.' "
- "which means that it will probably not work properly.", action_name));
+ g_message ("menutracker: action name %s doesn't look like 'app.' or 'win.'; "
+ "it is unlikely to work", action_name));
state = NULL;
if (found)
{
- GTK_NOTE(ACTIONS, g_message ("menutracker: %s existed from the start", action_name));
+ GTK_NOTE(ACTIONS, g_message ("menutracker: action %s existed from the start", action_name));
gtk_menu_tracker_item_action_added (GTK_ACTION_OBSERVER (self), observable, NULL, parameter_type, enabled, state);
}
else
{
- GTK_NOTE(ACTIONS, g_message ("menutracker: %s missing from the start", action_name));
+ GTK_NOTE(ACTIONS, g_message ("menutracker: action %s missing from the start", action_name));
gtk_menu_tracker_item_update_visibility (self);
}